﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MetroTube.BusinessLogic
{
    public class YouTubeVideo
    {
        private string _id;
        private string _name;
        private string _imgUrl;
        private YouTubeVideoLink[] _links;

        public YouTubeVideo(string id, string name, string imgUrl, YouTubeVideoLink[] links)
        {
            _id = id;
            _name = name;
            _imgUrl = imgUrl;
            _links = links;
        }

        public string Id
        {
            get { return _id; }
        }

        public string Name
        {
            get { return _name; }
        }

        public string ImgUrl
        {
            get { return _imgUrl; }
        }

        public YouTubeVideoLink[] Links
        {
            get { return _links; }
        }

        public override string ToString()
        {
            string links = string.Join("\n", Links.Select(x => x.ToString()).ToArray());

            return String.Format("Id = {1}\nName = {2}\nImage = {3}\n{4}", this.GetType().Name, Id, Name, ImgUrl, links);
        }

    }
}
